.class Lorg/zeam/PagingView$PageViewGestureDetector;
.super Landroid/view/GestureDetector$SimpleOnGestureListener;
.source "PagingView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/zeam/PagingView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "PageViewGestureDetector"
.end annotation


# instance fields
.field final synthetic this$0:Lorg/zeam/PagingView;


# direct methods
.method private constructor <init>(Lorg/zeam/PagingView;)V
    .locals 0
    .parameter

    .prologue
    .line 108
    iput-object p1, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-direct {p0}, Landroid/view/GestureDetector$SimpleOnGestureListener;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lorg/zeam/PagingView;Lorg/zeam/PagingView$PageViewGestureDetector;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 108
    invoke-direct {p0, p1}, Lorg/zeam/PagingView$PageViewGestureDetector;-><init>(Lorg/zeam/PagingView;)V

    return-void
.end method


# virtual methods
.method public onFling(Landroid/view/MotionEvent;Landroid/view/MotionEvent;FF)Z
    .locals 8
    .parameter "motionEvent1"
    .parameter "motionEvent2"
    .parameter "velocityX"
    .parameter "velocityY"

    .prologue
    const/high16 v7, 0x43fa

    const/high16 v4, 0x40a0

    const/4 v6, 0x0

    const/4 v5, 0x1

    .line 114
    if-nez p1, :cond_0

    .line 115
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v2}, Lorg/zeam/PagingView;->access$0(Lorg/zeam/PagingView;)Landroid/view/MotionEvent;

    move-result-object p1

    .line 117
    :cond_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    sub-float/2addr v2, v3

    cmpl-float v2, v2, v4

    if-lez v2, :cond_2

    .line 118
    invoke-static {p3}, Ljava/lang/Math;->abs(F)F

    move-result v2

    cmpl-float v2, v2, v7

    if-lez v2, :cond_2

    .line 120
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-virtual {v2}, Lorg/zeam/PagingView;->getMeasuredWidth()I

    move-result v1

    .line 121
    .local v1, pageViewWidth:I
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v2}, Lorg/zeam/PagingView;->access$1(Lorg/zeam/PagingView;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/LinearLayout;->getChildCount()I

    move-result v0

    .line 123
    .local v0, pageViewCount:I
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    sub-int v4, v0, v5

    if-ge v3, v4, :cond_1

    .line 124
    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    add-int/lit8 v3, v3, 0x1

    .line 123
    :goto_0
    invoke-static {v2, v3}, Lorg/zeam/PagingView;->access$3(Lorg/zeam/PagingView;I)V

    .line 126
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    mul-int/2addr v3, v1

    invoke-virtual {v2, v3, v6}, Lorg/zeam/PagingView;->smoothScrollTo(II)V

    move v2, v5

    .line 137
    .end local v0           #pageViewCount:I
    .end local v1           #pageViewWidth:I
    :goto_1
    return v2

    .line 124
    .restart local v0       #pageViewCount:I
    .restart local v1       #pageViewWidth:I
    :cond_1
    sub-int v3, v0, v5

    goto :goto_0

    .line 129
    .end local v0           #pageViewCount:I
    .end local v1           #pageViewWidth:I
    :cond_2
    invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v3

    sub-float/2addr v2, v3

    cmpl-float v2, v2, v4

    if-lez v2, :cond_4

    .line 130
    invoke-static {p3}, Ljava/lang/Math;->abs(F)F

    move-result v2

    cmpl-float v2, v2, v7

    if-lez v2, :cond_4

    .line 132
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-virtual {v2}, Lorg/zeam/PagingView;->getMeasuredWidth()I

    move-result v1

    .line 133
    .restart local v1       #pageViewWidth:I
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    if-lez v3, :cond_3

    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    sub-int/2addr v3, v5

    :goto_2
    invoke-static {v2, v3}, Lorg/zeam/PagingView;->access$3(Lorg/zeam/PagingView;I)V

    .line 134
    iget-object v2, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    iget-object v3, p0, Lorg/zeam/PagingView$PageViewGestureDetector;->this$0:Lorg/zeam/PagingView;

    invoke-static {v3}, Lorg/zeam/PagingView;->access$2(Lorg/zeam/PagingView;)I

    move-result v3

    mul-int/2addr v3, v1

    invoke-virtual {v2, v3, v6}, Lorg/zeam/PagingView;->smoothScrollTo(II)V

    move v2, v5

    .line 135
    goto :goto_1

    :cond_3
    move v3, v6

    .line 133
    goto :goto_2

    .end local v1           #pageViewWidth:I
    :cond_4
    move v2, v6

    .line 137
    goto :goto_1
.end method
